import {createApp} from "vue";
import App from "./App.vue";
import router from "./router"; //路由配置
import store from "./store/store"; //状态管理
import Antd from "ant-design-vue"; //ant-ui库
import "ant-design-vue/dist/reset.css"; //ant-ui库
import "@/styles/index.less"; //全局样式
import "./utils/permission"; //权限
import {registeIcon, registeMitt} from "./utils/common"; //注册方法
import loadingDirective from "@/components/loading/directive"; //全局loading指令
import {btnPermissionDirective} from "@/utils/btnPermission"; //全局按钮权限指令
const app = createApp(App);
//注册路由
app.use(router);
//注册状态管理
app.use(store);
//注册ant-ui库
app.use(Antd);
//注册icon组件
registeIcon(app);
//注册mitt
registeMitt(app);
//注册全局loading
app.directive("globalLoading", loadingDirective);
//注册全局按钮权限控制
app.directive("btnPermission", btnPermissionDirective);
//挂载
app.mount("#app");
